package com.imut.lagain.entity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

import java.time.LocalDateTime;

/**
 * 微信通知记录实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("wechat_notification")
public class WechatNotification {
    private static final Logger log = LoggerFactory.getLogger(WechatNotification.class);

    
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空")
    @TableField("user_id")
    private Long userId;
    
    /**
     * 模板ID
     */
    @NotBlank(message = "模板ID不能为空")
    @Size(max = 100, message = "模板ID长度不能超过100个字符")
    @TableField("template_id")
    private String templateId;
    
    /**
     * 事件类型
     */
    @NotBlank(message = "事件类型不能为空")
    @Size(max = 50, message = "事件类型长度不能超过50个字符")
    @TableField("event_type")
    private String eventType;
    
    /**
     * 通知内容（JSON格式）
     */
    @NotBlank(message = "通知内容不能为空")
    @TableField("content")
    private String content;
    
    /**
     * 发送状态（PENDING-待发送, SENT-已发送, FAILED-发送失败）
     */
    @TableField("send_status")
    private String sendStatus = "PENDING";
    
    /**
     * 发送时间
     */
    @TableField("send_time")
    private LocalDateTime sendTime;
    
    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public Long getUserId() {
        return userId;
    }
    
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    
    public String getTemplateId() {
        return templateId;
    }
    
    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }
    
    public String getEventType() {
        return eventType;
    }
    
    public void setEventType(String eventType) {
        this.eventType = eventType;
    }
    
    public String getContent() {
        return content;
    }
    
    public void setContent(String content) {
        this.content = content;
    }
    
    public String getSendStatus() {
        return sendStatus;
    }
    
    public void setSendStatus(String sendStatus) {
        this.sendStatus = sendStatus;
    }
    
    public LocalDateTime getSendTime() {
        return sendTime;
    }
    
    public void setSendTime(LocalDateTime sendTime) {
        this.sendTime = sendTime;
    }
    
    public LocalDateTime getCreateTime() {
        return createTime;
    }
    
    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
}
